package org.kepler.chat.api.infra.util;


public enum ErrorCode {
	
	//系统级
    SUCCESS(0,"success"), 
    SYS_ERROR(999999,"系统异常，请稍后再试"),
    FAILED(900000,"操作失败"),
    LIST_NULL_CONDITION(1,"未找到相关数据，换个筛选条件试试"),
    ATTACH_NOT_EXIST(2,"附件不存在"),
    REMOTE_ADDRESS_NOT_EXIST(3,"远程地址不存在"),
    SELECT_IMAGE_ERROR(4,"选取图片配置参数错误"),
    NO_PRE_ADMIN_ERROR(5,"请用管理员的身份操作"),
    USER_NOT_EXIST(6,"用户不存在"),
    VALIDATE_CODE_ERROR(7,"验证码错误"),
    SESSION_NOT_EXIST_SHOT_OFF(8,"当前会话已失效，有他人登录您的帐号，您已被踢出！"),
    DATE_FORMAT_ERROR(9,"日期格式转换异常"),
    SAVE_ERROR(10,"保存异常"),
    DELETE_ERROR(11,"删除异常"),
    UPDATE_ERROR(12,"更新异常"),
    QUERY_ERROR(13,"查询异常"),
    USER_EXIST(14,"用户已存在"),
    PASSWORD_NOT_SAME(15,"两次密码输入不一致"),

    //产品管理
    PRODUCT_ADD_ERROR(100001, "产品创建失败"),
    PRODUCT_NOT_EXIST(100002, "产品不存在或已被删除"),
    PRODUCT_NOT_PER_ADD(100003, "没有添加产品权限"),
    PRODUCT_NOT_PER_UPDATE(100004, "没有修改产品权限"),
    PRODUCT_NOT_PER_DELETE(100005, "没有删除产品权限"),
    PRODUCT_NOT_PER_ASSIGN(100006, "没有指派产品权限"),

    PARAM_OFFICEID_MISS(200001, "缺少参数机构ID"),
    PARM_PASSWORD_ERROR(200002,"密码错误"),
    PARM_USERNAME_OR_PASSWORD_MISS(200003,"账号或密码没有提供"),
    PARM_CAPTCHA_MISS(200004,"验证码为空"),
    PARM_CAPTCHA_INPUT_ERROR(200005,"验证码输入错误"),
    PARM_CAPTCHA_ERROR(200006,"验证码不存在或已过期"),
    PARAM_PRODUCTID_MISS(200007,"缺少产品ID参数"),
    PARAM_PHONE_MISS(200008,"缺少手机号参数"),
    PARAM_CUSTOMERNMAE_MISS(200009,"缺少客户姓名参数"),
    PARAM_CHANNELCODE_MISS(200010,"缺少邀请码参数"),
    AMOUNT_FORMAT_ERROR(200011,"[金额]格式有误，不能为空，只允许数字，整数部分最多5位，小数部分最多2位，金额不能为负数，请重新输入"),
    PARAM_PASSWORD_MISS(200012,"缺少密码参数"),
    NUM_FORMAT_ERROR(200013,"格式有误，请输入数字类型"),

    // 组织机构管理
    OFFICE_NOT_EXIST(300001, "机构不存在"),
    DEPTMEMBER_NOT_EMPTY(300002, "该部门下存在%d个用户，不能直接删除"),
    USER_NOT_EMPTY_FOR_ROLE(300003, "该职位下存在%d个用户，不能直接删除"),
    NOT_ALLOW_ADD_AGENT_USER(300004, "不能添加代理商的用户"),
    NOT_ALLOW_ADD_AGENT_DEPT(300005, "不能添加代理商的部门"),
    ONLY_ALLOW_ADD_DEPT_DEPT(300006, "部门下只能选择部门类型"),
    ONLY_ALLOW_ADD_AGENT_OR_DEPT(300007, "总部下只能选择代理商或部门类型"),
    ONLY_ALLOW_ADD_AGENT_DEPT(300008, "代理商下只能选择部门类型"),
    NOT_ALLOW_CHANGE_USER_ROOTORG(300009, "不能更改用户所属代理商"),
    OVER_USE_USER_NUM(300010, "用户人数已达到上限，不能再添加"),

    // 客户管理
    NOT_PER_ADD_CUSTOMER(400001, "没有添加客户权限"),
    NOT_PER_EDIT_SELF_CUSTOMER(400002, "没有修改自己的客户资料权限"),
    NOT_PER_EDIT_OTHER_CUSTOMER(400003, "没有修改他人的客户资料权限"),
    NOT_PER_CHANGE_TO_USER(400004, "没有转交给他人权限"),
    NOT_PER_CHANGE_TO_PUBLIC_CUSTOMER(400005, "没有转为公客权限"),
    NOT_PER_CHANGE_TO_BLACKLIST_CUSTOMER(400006, "没有拉入黑名单权限"),
    NOT_PER_CHANGE_PUBLIC_TO_USER(400007, "没有将公客转交给其他人权限"),
    NOT_PER_CHANGE_RECEIVE(400008, "没有领取公共客户权限"),
    NOT_PER_EDIT_PUBLIC_CUSTOMER(400009, "没有修改公共客户权限"),
    NOT_PER_DELETE_PUBLIC_CUSTOMER(400010, "没有删除公共客户权限"),
    NOT_PER_DELETE_SELF_CUSTOMER(400011, "没有删除自己客户权限"),
    NOT_PER_DELETE_OTHER_CUSTOMER(400012, "没有删除别人客户权限"),
    CUSTOMER_NOT_EXIST(400013, "客户不存在或已被删除"),
    PARAM_SHARETOUSER_MISS(400014,"缺少共享的用户"),
    PARAM_NOTSHARETOUSER_MISS(400015,"缺少取消共享的用户"),
    CUSTOMER_INFO_MISS(400015,"客户信息不完整"),
    CUSTOMER_EXIST(400016,"客户已存在"),
    CUSTOMER_PHONE_EXIST(400017,"已存在手机号为：%s 的客户"),
    NOT_PER_RESTORE_CUSTOMER(400018,"没有恢复客户的权限"),

    // 订单管理
//    NOT_PER_AUDIT_ORDER_AUDITOR(401001, "没有审单员审核权限"),
//    NOT_PER_AUDIT_ORDER_FRONT_RISK_CONTROL_FIRST(401002, "没有前置风控一审权限"),
//    NOT_PER_AUDIT_ORDER_HOUSEHOLD_INSPECT(401003, "没有下户考察审核权限"),
//    NOT_PER_AUDIT_ORDER_FRONT_RISK_CONTROL_SECOND(401004, "没有前置风控二审权限"),
//    NOT_PER_AUDIT_ORDER_INTERVIEWING(401005, "没有面签审核权限"),
//    NOT_PER_AUDIT_ORDER_TEL(401006, "没有电核审核权限"),
    ADD_ORDER_PRODUCT_MISS(401007, "产品信息不存在或已被删除"),
    ADD_ORDER_CUSTOMER_MISS(401008, "订单信息不完整"),
    AUDIT_ORDER_ORTHER_DOING(401009, "订单正在被其他人审核中"),
    AUDIT_ORDER_HOUSE_INSPECT_DONE(401010, "订单已被下户考察处理完毕"),
    SIGNATURE_ERROR(401011, "签名保存失败"),
    NOT_PER_EDIT_SELF_ORDER(401012, "没有修改自己订单资料权限"),
    NOT_PER_EDIT_OTHER_ORDER(401013, "没有修改他人订单资料权限"),
    ORDER_NOT_EXIST(401014, "订单不存在或已被删除"),
    NOT_PER_SUBMIT_SELF_ORDER(401015, "没有提交自己订单审核权限"),
    NOT_PER_SUBMIT_OTHER_ORDER(401016, "没有提交他人订单审核权限"),
    NOT_PER_REVOKE_SELF_ORDER(401017, "没有撤销自己订单权限"),
    NOT_PER_REVOKE_OTHER_ORDER(401018, "没有撤销他人订单权限"),
    NOT_PER_DELETE_SELF_ORDER(401019, "没有删除自己订单权限"),
    NOT_PER_DELETE_OTHER_ORDER(401020, "没有删除他人订单权限"),
    LOAN_TYPE_NOT_EXIST(401021, "贷款类型不存在"),
    CUSTOMER_NAME_BORROWER_NAME_NOT_MATCH(401022, "客户名称与借款人不一致"),
    NOT_CHANNEL_PRODUCT(401023, "订单中没有渠道产品，不能提交进件"),
    NOT_PER_AUDIT_ORDER(401024, "没有订单审核权限"),
    NOT_DELETE_ALL_ORDER_PRODUCT(401025, "至少有一个产品，不能全部删除"),
    NOT_PER_EDIT_ORDER_PRODUCT(401026, "没有修改订单产品信息权限"),
    ORDER_PRODUCT_NOT_EXIST(401027, "订单产品不存在或已被删除"),
    NOT_PER_MANAGE_ORDER_PROTOCOL(401028, "没有管理订单合同权限"),
    NOT_PER_MANAGE_ORDER_VIDEO(401029, "没有管理订单签约视频权限"),
    NOT_PER_MANAGE_ORDER_PRODUCT(401030, "没有管理订单产品权限"),
    NOT_PER_EXPORT_ORDER(401031, "没有导出订单资料权限"),

    //渠道产品
    NOT_PER_AUDIT_CHANNEL_PRODUCT_ORDER(401801, "没有订单审核权限"),
    NOT_PER_PREVIEW_CHANNEL_PRODUCT_ORDER(401802, "没有订单查看权限"),
    NOT_PER_EXPORT_CHANNEL_PRODUCT_ORDER(401803, "没有订单下载权限"),
    NOT_CLONE_CHANNEL_PRODUCT(401804, "渠道产品已复制到产品库"),
    APPLY_CHANNEL_PRODUCT_AUDITING(401805, "已有申请记录正在审核中"),
    APPLY_CHANNEL_PRODUCT_SUCCESS(401806, "您已经是该产品的代理商，不能再申请"),

    // 审批
    EXAMINE_MUST_GT_CURRENT_STEP(401901, "请选择当前步骤之后的审核步骤"),
    EXAMINE_MUST_LT_CURRENT_STEP(401902, "请选择当前步骤之前的审核步骤"),
    EXAMINE_EMPTY(401903, "请联系管理员配置审批流程"),


    // 代扣
    NOT_PER_ADD_WITHHOLD_PROTOCOL(402001, "没有签约代扣合同权限"),
    NOT_PER_EDIT_WITHHOLD_PROTOCOL(402002, "没有修改代扣合同权限"),
    NOT_PER_VIEW_WITHHOLD_PROTOCOL(402003, "没有查看代扣合同权限"),
    CUSTOMERNAME_IDCARDNAME_NOT_MATCHED(402004, "客户名称与身份证名称不一致"),
    NOT_PER_AUDIT_WITHHOLD_PROTOCOL(402006, "没有审核代扣合同权限"),
    NOT_PER_VIEW_SINGLE_DEDUCTION(402007, "没有查看单笔扣款权限"),
    NOT_PER_ADD_SINGLE_DEDUCTION(402008, "没有添加单笔扣款权限"),
    MUST_BE_NUMERIC(402010, "数据格式有误，必须是数字类型"),
    PROTOCOL_NOT_EXIST(402011, "合同不存在或已被删除"),
    OVER_PAYMENT_AMOUNT(402012, "已达到该合同每期扣款金额上限，不能发起扣款"),
    TRADE_AUDIT_UNDONE(402013, "该合同有笔扣款正在等待审核中，不能发起扣款"),
    TRADE_PROCESSING(402014, "该合同有笔扣款正在处理中，不能发起扣款"),
    OVER_PAYMENT_TIMES(402015, "已达到该合同扣款分期期数上限，不能发起扣款"),
    OVER_TOTAL_PAYMENT(402016, "已达到该合同扣款总金额上限，不能发起扣款"),
    OVER_ORG_TOTAL_PAYMENT(402017, "金额超过扣款金额最大限制，不能发起扣款"),
    TRADE_NOT_EXIST(402018, "扣款交易记录不存在或已被删除"),
    NOT_PER_AUDIT_SINGLE_DEDUCTION(402019, "没有审核单笔扣款权限"),
    FLUSH_TRADE_FAIL(402020, "刷新交易记录状态失败"),
    WITHDRAWAL_PROCESSING(402021, "有笔提现申请正在处理中，不能发起提现"),
    OVER_WITHDRAWAL_BALANCE(402022, "账户余额不足，不能发起提现"),
    BILL_TYHPE_NOT_SUPORT(402023, "不支持的账单类型"),
    RECHARGE_NOT_EXIST(402024, "充值记录不存在或已被删除"),
    OVER_WITHHOLD_BALANCE(402025, "账户余额不足"),

    // 合同模板
    PROTOCOL_TEMPLATE_NOT_EXIST(403001, "合同模板不存在或已被删除"),

    //图表
    VIZ_TYPE_NOT_EXIST(500001,"图表类型不存在"),
    ERROR_NOT_BOTH(500002,"Choose either fields to [Group By] and [Metrics] or [Columns], not both"),
    VIZ_FOLDER_NOT_EXIST(500003,"图表所属的文件夹不存在"),
    VIZ_WORKTABLE_NOT_EXIST(500004,"图表所属的工作表不存在"),
    VIZ_DASHBOARD_NOT_EXIST(500005,"图表所属的仪表盘不存在"),
    VIZ_CREATE_SOURCE_NOT_FIND(500006,"没有找到图表的创建来源"),
    VIZ_NOT_EXIST(500007,"图表不存在"),
    VIZ_GRANULARITY_ERROR(500008,"日期格式才能设置颗粒度"),
    VIZ_ADD_ERROR(500009,"图表保存失败"),
    VIZ_DELETE_ERROR(500010,"图表删除失败"),
    QOQYOY_DATE_FILE_MISS(500011,"高级计算同比环比缺少时间"),
    DIMENSION_MISS(500012,"维度值为空"),
    METRICS_MISS(500013,"度量值为空"),
    DIMENSION_ONLY_ONE(500014,"维度有且只能为一个"),
    VIZ_FIELD_ERROR(500015,"查询的维度或数值字段不符合条件，请重新筛选必要字段：访问日期、账号创建时间、用户ID、是否是回访。"),
    VIZ_HAED_USED(500016,"工作表已经被使用"),

    //仪表盘
    NO_FOLDER_NAME(600001,"文件夹名字不能为空"),
    FOLDER_ADD_ERROR(600002,"添加文件夹失败"),
    FOLDER_QUERY_ERROR(600003,"文件夹查询异常"),
    FOLDER_NAME_REPEAT(600004,"文件夹名字重复"),
    FOLDER_DELETE_ERROR(600005,"文件夹删除失败"),
    FOLDER_OR_DASHBOARD_UPDATE_ERROR(600006,"文件夹或仪表盘更新失败"),
    DASHBOARD_QUERY_ERROR(600007,"仪表盘查询异常"),
    DASHBOARD_DELETE_ERROR(600008,"仪表盘删除异常"),
    DASHBOARD_ADD_ERROR(600009,"仪表盘添加异常"),
    DASHBOARD_NOT_EXIST(600010,"仪表盘不存在"),
    FOLDER_DELETE_TEMPLATE_ERROR(600011,"文件夹删除模板填充异常"),
    DASHBOARD_NAME_REPEAT(600012,"仪表盘名称重复"),
    WORKTABLE_NOT_EXIST(600013, "工作表不存在"),
    WORKTABLE_TABLECOLUMN_NOT_EXIST(600014,"工作表对应的列不存在"),

    //日期转换
    DATA_FORMAT_ERROR(700001, "日期转换异常"),

    API_TOKEN_EXPIRED(1001, "登录已过期，请重新登录"),
    API_INVALID_TOKEN(800002, "无效token，请重新获取"),
    API_BAD_CREDENTIALS(800003, "bad Credentials"),
    API_AUTHENTICATION_FAILED(800004, "authentication failed"),
    LOGIN_CODE_ERROR(900001, "验证码错误"),
    LOGIN_CODE_OVERTIME(900002, "验证码已失效"),
    LOGIN_SYSTEM_OVERTIME(900003, "系统已到期，暂不能登陆"),
    LOGIN_MAC_OVERTIME(900004, "Mac地址已绑定5个,暂不能登录"),
    LOGIN_DIFFERENT_PLACE(900005, "已连续5次异地登录，暂不能登录"),
    LOGIN_NO_ACCOUNT_EXISTS(900006, "账号不存在"),
    LOGIN_PASSWORD_ERROR(900007, "密码错误"),
    LOGIN_ACCOUNT_ISLOCK(900008, "账号被锁定"),
    LOGIN_UNKOWN_ERROE(900009, "未知错误,请联系管理员."),

    ;
   
	
	private int code;
    private String message;
    
    private ErrorCode(int code, String message) {   
        this.code = code;   
        this.message = message;   
    }

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}


}